feat(prose-tests): decide in code what an agent should not be deciding#562
Open
leeovery wants to merge 2 commits into
Open
feat(prose-tests): decide in code what an agent should not be deciding#562leeovery wants to merge 2 commits into
leeovery wants to merge 2 commits into
Conversation
The world delta proves the outcome. It cannot prove the outcome was
earned: a walk that ignored every instruction and wrote the expected
files directly lands exactly the same state as one that followed the
prose. Only the order of what it did separates them, and that has been
recorded all along without anything reading it.
Cases can now declare invariants over the recorded actions, checked
before the asserter sees anything:
engine_before_write no workflow state written without first consulting
the engine — a skill learns what it knows through
the engine, so a write that precedes every call
did not come from following the prose
calls_include commands the walk must have run
calls_exclude commands it must not have
A verdict computed in code cannot drift between runs, and the asserter is
told it may not overturn one. Where a check can carry a claim, the claim
moves: implementation-picks-first-task no longer asks an agent whether a
task was started, it asserts that neither `task start` nor `task next`
appears in the record.
Deliberately not a pinned call sequence. Recording one and replaying it
would freeze whatever the walker happened to do, which is how a test
starts certifying broken prose rather than catching it. The declarations
are hand-written, like every other part of a case.
Every case that builds a world takes engine_before_write — it costs
nothing and it is the fabrication detector. The four cases retired in the
next change are left untouched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
engine_before_write looked only at the write tools, so a walk that created workflow state with `printf … > .workflows/…` was reported as having written nothing at all — the check passed by vacancy, on the one walk it most needed to examine. Found by running it: an Opus walk of implementation-picks-first-task built the setup document through the shell while a Sonnet walk of the same case used the Write tool. Same world, same delta, and only one of them was being checked. Redirects, tee, cp, mv and install into the workflow directory now count as writes. Segment separators bound the match, so a redirect elsewhere in a compound command is not mistaken for one into `.workflows`, and reading state is still reading. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
engine_before_write— no.workflowswrite without first consulting the engine. A skill learns what it knows through the engine, so a write preceding every call didn't come from following the prose.calls_include/calls_exclude— commands the walk must, or must not, have run.implementation-picks-first-taskno longer asks an agent whether a task was started; it assertstask startandtask nextare absent from the record.Test plan
node --test tests/scripts/test-prose-invariants.cjs— 20/20 covering each check, the declaration surface, and validation of malformed declarations.workflowswrite and nothing else produces🤖 Generated with Claude Code
Stack